package com.crm.domain.vo;

import com.baomidou.mybatisplus.annotation.*;
import com.crm.domain.entity.Dept;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author Xanny
 */
@Data
@TableName(value = "user",autoResultMap = true)
public class UserVo implements Serializable {

    @TableId(type = IdType.AUTO)
    private Long userId;

    private String userName;

    private String nickName;

    private String password;

    private String status;

    private String userType;

    private String avatar;

    private String email;

    private String realName;

    private String phonenumber;

    private Character sex;

    private Long deptId;

    private String postNo;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    private String createBy;

    private String updateBy;

    private Integer delFlag;

    private List<Long> roles;

    //用户的部门信息
    private Dept dept;

}